package cn.xej.demo.common;

import cn.xej.demo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;


/**
 * @Author alicat.xu
 * @Date 2021/10/11 4:22 下午
 */
public class TaskService implements ApplicationListener<ContextRefreshedEvent> {

//    @Autowired
//    private User user;


//    public void test(){
//        System.out.println(".............");
//        System.out.println(user);
//    }

    @Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        System.out.println("容器初始化完成");
    }
}
